const SWITCH = {
    API:1
}

const Constant = {
      PROTOCOL: "http",
      HOST: SWITCH.API?"www.feichimedia.com":'localhost',
      PREFIX: SWITCH.API? "game/":"",
      PROT: SWITCH.API?"80":"8088",
};

const ApiList = {
    
    Login:"after/login",
    Banner:"after/banner/",
    Game:"after/game/",
    Admin:"after/admin/",
    Order:"after/order/",
    AttendRecord:"after/attendrecord/",
    Logout:"after/logout",
    Region:"front/region/",
    Setting:"after/setting/",
    ExportExcel:"after/export/"

};

function Api(apiName){
    return Constant.PROTOCOL + "://" + Constant.HOST + ":" +  Constant.PROT +"/"+Constant.PREFIX+ ApiList[apiName];
}
function Prefix(){
    return Constant.PROTOCOL + "://" +  Constant.HOST + "/" ;
}
export default {
    Api,
    Prefix
}
